package com.liu.service;

import com.liu.controller.dto.PasswordDTO;
import com.liu.controller.dto.UserDTO;
import com.liu.entity.User;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lsy
 * @since 2023-01-15
 */
public interface UserService {
    //查询所有用户
    List<User> findAllUser();
    //分页查询
    List<User> selectPage(Integer pageNum,Integer pageSize,String username,String address);
    //查询总页数
    int selectTotal(String username,String address);
    //根据id查找用户信息
    User selectUserById(int id);
    //添加用户
    int addUser(User user);
    //批量插入
    Boolean saveBatch(List<User> users);
    //更新用户
    int updateUser(User user);
    //更新密码
    int updatePwd(PasswordDTO passwordDTO);
    //删除用户
    int deleteUser(int id);
    //批量删除
    int deleteByIds(List<Integer> ids);
    //登录
    User login(Map<String, Object> map);
    //根据用户名查找用户
    User findUserByName(String username);
}
